
import java.util.Vector;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Administrator
 */
public class VectorDemo3 {
      public static void main(String[] args) {
        Vector v2=new Vector();
        for (int i = 0; i <=10; i++) {
            v2.add("第"+i+"个小孩");
            
        }
        System.out.println(v2);
        
        for(; ;){
            if(v2.size()==1) break;
            for (int k = 0; k <2; k++) {
                v2.add(v2.get(0));
                v2.remove(0);
                
                System.out.print("当前容器的内容是:");
                System.out.println("v2");
                  
            }
            v2.remove(0);
        }
        System.out.println("最后的容器内容是:");
        System.out.println(v2);
    }

}
